Generally, a light emitting device employing nitride semiconductors includes an n-type semiconductor layer, an active layer, and a p-type semiconductor layer. In the active layer, electrons and holes are recombined to emit light. A recombination rate of electrons and holes in the active layer directly affects luminous efficacy of the light emitting device. In order to improve the recombination rate of electrons and holes in the active layer, it is necessary to prevent overflow of electrons. For this purpose, an electron blocking layer of a p-type AlGaN layer is adopted.